<?php
namespace app\api\controller;

// use app\common\model\DataUser;


use app\api\service\Token;
// use think\facade\Request;

class User
{
	public function index()
	{
		
		$token = Token::create(1);

		return $token;
	}

	public function demo()
	{

		return "this is demo";
	}

	/**
	 * POST
	 */
	public function reg()
	{
		// id, mobile, realname, password, username, avatar, payment, status
		// $mobile = Request::param('mobile');
		// // $a = DataUser::checkMobile($mobile);
		// if (DataUser::checkMobile($mobile) == 1) {
		// 	return success('10001', '手机号已注册');
		// }
		// $realname = Request::param('realname');
		// $avatar = Request::param('avatar');
		// $wxdata = [
		// 	"region_city" => "邳州",
		// 	"region_province" => "江苏省",
		// 	"region_area" => "徐州",
		// 	"age" => 18,
		// 	"sex" => 0,
		// 	"height" => "180"
		// ];

		// // wxappUserReg(mobile, realname, avatar, wxdata)

		// $res = DataUser::wxappUserReg($mobile, $realname, $avatar, $wxdata);

		// return json(['data'=>$res]);
	}



}